package com.cindata

import com.cindata.dictionary.*

class Contract
{
    // Mortgage serialNumber
    //贷款合同号
    ContractType type
    //合同类型
    String contractNumber
    //合同编号
    Date contractSignDate
    //合同签订日期
    Contact contact
    //质押权人/债权人
    String pledgor
    //出质人
    BorrowerTypeDict borrowerType
    //借款人类型
    String borrowerCompany
    //借款人单位
    String bankNumber
    //银行账号
    String openAddress
    //开户地址
    String linkMan
    //联系人
    String telePhone
    //手机
    String openBank
    //开户行
    Date startDate
    //开始日期
    Integer loansDuration
    //贷款期限
    Date endDate
    //到期日期
    BigDecimal loansAmount
    //贷款金额
    LoansUseDict loansUse
    //贷款用途
    PayInterestTypeDict payInterestType
    //付息方式
    BigDecimal loanAnnualInterestYearRate
    //贷款年利率
    BigDecimal overdueInterestDayRate
    //逾期日利率
    String signAddress
    //签约地址
    String guarantee
    //担保人
    String collateralContent
    //抵质押内容

    Date createdDate = new Date()
    Date modifiedDate = new Date()

    static constraints = {

        // serialNumber nullable: true, blank: true

        type nullable: true, blank: true, comment: '合同类型'
        contractNumber unique: true
        contractNumber nullable: true, blank: true, comment: '合同编号'
        contractSignDate nullable: true, blank: true, comment: '合同签订日期'
        contact nullable: true, blank: true, comment: '质押权人'
        pledgor nullable: true, blank: true, comment: '出质人'
        borrowerType nullable: true, blank: true, comment: '借款人类型'
        borrowerCompany nullable: true, blank: true, comment: '借款人单位'
        bankNumber nullable: true, blank: true, comment: '银行账号'
        openAddress nullable: true, blank: true, comment: '开户地址'
        linkMan nullable: true, blank: true, comment: '联系人'
        telePhone nullable: true, blank: true, comment: '手机'
        openBank nullable: true, blank: true, comment: '开户行'
        startDate nullable: true, blank: true, comment: '开始日期'
        loansDuration nullable: true, blank: true, comment: '贷款期限'
        endDate nullable: true, blank: true, comment: '到期日期'
        loansAmount nullable: true, blank: true, comment: '贷款金额'
        loansUse nullable: true, blank: true, comment: '贷款用途'
        payInterestType nullable: true, blank: true, comment: '付息方式'
        loanAnnualInterestYearRate nullable: true, blank: true, comment: '贷款年利率'
        overdueInterestDayRate nullable: true, blank: true, comment: '逾期日利率'
        signAddress nullable: true, blank: true, comment: '签约地址'
        guarantee nullable: true, blank: true, comment: '担保人'
        collateralContent nullable: true, blank: true, comment: '抵质押内容'
        createdDate nullable: true, blank: true, comment: '创建日期'
        modifiedDate nullable: true, blank: true, comment: '修改日期'
    }
}